package priv.mill.xml;
import org.apache.log4j.Logger;

public class ZhongJie {

	
	private Maifang maifang;
	
	
	public ZhongJie(Maifang maifang1) {
		this.maifang=maifang1;
	}

	public int saleHouse() {
		System.out.println("宣传：房子很好位置很好价格不贵，快来买");
		int result = 0;
		try {
			result = maifang.saleHouse();
		} catch (Exception e) {
			// TODO: handle exception
		}
		System.out.println("房子卖了，我来办理过户手续");
		return result-10;
	}

	public static void main(String[] args) {
		Maifang maifang1 = new Maifang();
		ZhongJie maifang2=new ZhongJie(maifang1);
		int saleHouse = maifang2.saleHouse();
		System.out.println(saleHouse);
	}

	private static final Logger logger = Logger.getLogger(ZhongJie.class);
}
